//    Copyright (C) Kherty.  All rights reserved.
using System.Diagnostics.Contracts;

namespace OpenLS.Core.Serialization
{
    public class ExtensionAttribute
    {
        private string _name;
        public string Name
        {
            get { return _name; }
            set
            {
                Contract.Requires(!value.Contains(":"));
                _name = value;
            }
        }

        public string Prefix { get; set; }

        public string Value { get; set; }

        public string NamespaceUri { get; set; }

        public XmlNamespace Namespace
        {
            get
            {
                return new XmlNamespace(Prefix, NamespaceUri, false); //\\ sure?
            }
        }
    }
}
